TheK=1
TheM=2

nb   : data/$X.arff ready 
	@ ./blab $X $(TheM) $(TheK)
	@randarff data/$X.arff  \
    | nb  TheK=$(TheK) TheM=$(TheM) \
    | abcd  Db=$X Rx0=learner,m,k Rx=nb,$(TheM),$(TheK) | malign

egnbwNom      : ; @$(MAKE) nb X=weather.nominal
egnbwNom3     : ; @$(MAKE) nb X=weather3.nominal
egnbWine      : ; @$(MAKE) nb X=wine 
egnbSoybean   : ; @$(MAKE) nb X=soybean 
egnbCredit    : ; @$(MAKE) nb X=credit 
egnbDiabetes  : ; @$(MAKE) nb X=diabetes 
egnbAnneal    : ; @$(MAKE) nb X=anneal 
egnbAudiology : ; @$(MAKE) nb X=audiology 
egnbLetter    : ; @$(MAKE) nb X=letter
egnbLetterX   : ; @$(MAKE) nb X=letterx # all ints treated as symbols

Data=weather.nominal weather3.nominal wine soybean credit diabetes anneal audiology

nb1out : $(Safe)/nb1.txt

$(Safe)/nb1.txt : make_nb.mk ./src/nb ./src/randarff ./src/abcd 
	@$(foreach d,$(Data),\
       $(foreach k,0 1 2 3,\
         $(foreach m,0 1 2 3,\
           $(foreach r,1 2 3 4 5 6 7 8 9 10,\
             $(MAKE) X=$d TheK=$k TheM=$m nb >> $@ ;))))


$(Safe)/nb1f.txt :    $(Safe)/nb1.txt ; @slice Want="#source,learner,m,k,f"    $< > $@
$(Safe)/nb1acc.txt :  $(Safe)/nb1.txt ; @slice Want="#source,learner,m,k,acc"  $< > $@
$(Safe)/nb1pd.txt :   $(Safe)/nb1.txt ; @slice Want="#source,learner,m,k,pd"   $< > $@
$(Safe)/nb1prec.txt : $(Safe)/nb1.txt ; @slice Want="#source,learner,m,k,prec" $< > $@
$(Safe)/nb1pf.txt :   $(Safe)/nb1.txt ; @slice Want="#source,learner,m,k,pf"   $< > $@

nbdemo : ready \
	$(Safe)/nb1f.txt \
	$(Safe)/nb1acc.txt \
	$(Safe)/nb1pd.txt   \
	$(Safe)/nb1prec.txt  \
	$(Safe)/nb1pf.txt
	echo path $(PATH)
	./src/quartiles $(Safe)/nb1acc.txt	


##############################################################


